package com.hjh.gameforum.mapper;

import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Mapper;

@Mapper
public interface FavoritesMapper {
    void createFavorites(Long userId, Integer topicId);

    void deleteFavorites(Long userId, Integer topicId);

    boolean getFavorites(Long userId, Integer topicId);

    @Delete("delete from user_favorites where topic_id = #{topicId}")
    void deleteFavoritesByTopicId(Long topicId);
}
